import java.awt.Color;
import java.awt.Graphics;

public class Explode {
	private int x;
	private int y;
	private int step;
	private boolean live = true;
	
	private TankClient tc;
	int[] diameter = { 4, 7, 12, 18, 26, 32, 49, 30, 14, 6 };

	public Explode(int x, int y) {
		this.x = x;
		this.y = y;
	}

	public Explode(int x, int y, TankClient tc) {
		this(x, y);
		this.tc = tc;
	}
	
	
	public boolean isLive() {
		return live;
	}

	public void setLive(boolean live) {
		this.live = live;
	}

	public void draw(Graphics g) {
		// TODO Auto-generated method stub
		if(!live) return;
		if(diameter.length == step){
			step = 0;
			this.live = false;
		}
		Color c = g.getColor();
		g.setColor(Color.ORANGE);
		g.fillOval(x, y, diameter[step],diameter[step]);
		g.setColor(c);
		step ++;
	}
	
	
}
